package com.springboot.blog.beans;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

@Data
@TableName(value = "blog_comment")
public class BlogComment implements Serializable {

    @TableId(value = "comment_id", type = IdType.AUTO)
    private Long commentId;
    @TableId(value = "blog_id")
    private Long blogId;
    @TableField(value = "comment_name")
    private String commentName;
    @TableField(value = "comment_content")
    private String commentContent;
    @TableField(value = "comment_email")
    private String commentEmail;
    @TableField(value = "comment_status")
    private Integer commentStatus;

    @TableLogic
    @TableField(fill = FieldFill.INSERT,value = "comment_deleted")
    private Integer commentDeleted;

    @TableField(fill= FieldFill.INSERT,value = "comment_create_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="Asia/Shanghai")
    private Date commentCreateTime;
}
